# c_src/CMakeLists.txt
cmake_minimum_required(VERSION 3.10)
project(allocation_recoder)
project(allocation_recoder LANGUAGES CXX)  # 明确指定为 C++ 项目

# 设置 C++ 标准
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)


add_subdirectory(cpptrace)
# 将 C 代码编译为静态库
add_library(allocation_recoder STATIC allocation_recoder.cpp)
target_link_libraries(allocation_recoder cpptrace::cpptrace)

# 安装静态库到指定目录
install(TARGETS allocation_recoder ARCHIVE DESTINATION lib)
